fix(ci): replace SWIFTLM_PR_TOKEN with GITHUB_TOKEN in upstream sync#7
Merged
fix(ci): replace SWIFTLM_PR_TOKEN with GITHUB_TOKEN in upstream sync#7
Conversation
…workflow The SWIFTLM_PR_TOKEN PAT (belonging to solderzzc) has lost write access to SharpAI/mlx-swift, causing the upstream sync job to fail with HTTP 403. The repo already has default_workflow_permissions=write and can_approve_pull_request_reviews=true, so GITHUB_TOKEN is sufficient for both force-pushing the sync branch and creating the PR.
There was a problem hiding this comment.
Pull request overview
This PR fixes the scheduled upstream-sync GitHub Actions workflow by replacing a now-invalid personal access token secret (SWIFTLM_PR_TOKEN) with the built-in GITHUB_TOKEN, restoring the workflow’s ability to force-push the sync branch and open/update a PR.
Changes:
- Update
actions/checkoutto authenticate withsecrets.GITHUB_TOKEN. - Update the
gh pr createstep to usesecrets.GITHUB_TOKENfor authentication.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Run #24622349998 failed with:
The
SWIFTLM_PR_TOKENsecret is a PAT belonging to thesolderzzcaccount, which has lost write access to this repository.Fix
Switch both checkout token and
GH_TOKENto use the built-inGITHUB_TOKEN. The repo already has:default_workflow_permissions: writecan_approve_pull_request_reviews: trueSo
GITHUB_TOKENhas sufficient permissions for both the force-push and PR creation.